/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2023-02-24     86188       the first version
 */
#ifndef APPLICATIONS_HEADER_FILE_GPIO_H_
#define APPLICATIONS_HEADER_FILE_GPIO_H_

#include <board.h>
#include <rtdevice.h>

typedef enum
{
    power_led_status = GET_PIN(A, 0),
    power_led = GET_PIN(A, 1),
    out_usb2_reset = GET_PIN(A, 8),
    key_prev = GET_PIN(B, 0),
    key_onoff = GET_PIN(B, 1),
    out_audio_i2s_switch = GET_PIN(B, 8),
    out_audio_power_enable = GET_PIN(B, 9),
    leds_right = GET_PIN(B, 10),
    leds_left = GET_PIN(B, 11),
    out_usb2_vbus = GET_PIN(B, 14),
    plug_check = GET_PIN(C, 2),
    key_run = GET_PIN(C, 4),
    key_next = GET_PIN(C, 5),
    out_audio_usb_enable = GET_PIN(C, 6),
    out_audio_run = GET_PIN(C, 7),
    out_audio_next = GET_PIN(C, 8),
    out_audio_prev = GET_PIN(C, 9),
    out_usb3_vbus = GET_PIN(C, 11),
    out_usb3_reset = GET_PIN(C, 12),
    led_2 = GET_PIN(C, 14),
    led_3 = GET_PIN(C, 13),
} G_io_set;

typedef struct
{
    void (*high)(uint8_t ID);
    void (*low)(uint8_t ID);
    void (*toggle)(uint8_t ID);
} G_ioHandleTypedef;

extern G_ioHandleTypedef G_ioHandle;
#endif /* APPLICATIONS_HEADER_FILE_LED_H_ */
